\hypertarget{_a_d_c_8h}{\section{C\-:/\-Users/\-Stefan/\-Documents/\-Atmel Studio/\-Robotik\-Seminar/\-R\-R\-T/include/\-A\-D\-C.h File Reference}
\label{_a_d_c_8h}\index{C\-:/\-Users/\-Stefan/\-Documents/\-Atmel Studio/\-Robotik\-Seminar/\-R\-R\-T/include/\-A\-D\-C.\-h@{C\-:/\-Users/\-Stefan/\-Documents/\-Atmel Studio/\-Robotik\-Seminar/\-R\-R\-T/include/\-A\-D\-C.\-h}}
}
{\ttfamily \#include $<$avr/io.\-h$>$}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{_a_d_c_8h_a342ab07b607f3dc4efa0655ca1acd164}{init\-\_\-\-A\-D\-C} ()
\item 
uint16\-\_\-t \hyperlink{_a_d_c_8h_ac598032b0c53050ef59fcbba6609206d}{read\-\_\-\-A\-D\-C} (uint8\-\_\-t channel)
\item 
uint16\-\_\-t \hyperlink{_a_d_c_8h_a78b7cf5d1a236acaf9fbcc4aed22ff31}{read\-\_\-2\-\_\-\-A\-D\-C} (uint8\-\_\-t channel)
\item 
uint16\-\_\-t \hyperlink{_a_d_c_8h_a8ccea788f2803928cb88aa9ed0f05d76}{read\-\_\-4\-\_\-\-A\-D\-C} (uint8\-\_\-t channel)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{_a_d_c_8h_a342ab07b607f3dc4efa0655ca1acd164}{\index{A\-D\-C.\-h@{A\-D\-C.\-h}!init\-\_\-\-A\-D\-C@{init\-\_\-\-A\-D\-C}}
\index{init\-\_\-\-A\-D\-C@{init\-\_\-\-A\-D\-C}!ADC.h@{A\-D\-C.\-h}}
\subsubsection[{init\-\_\-\-A\-D\-C}]{\setlength{\rightskip}{0pt plus 5cm}void init\-\_\-\-A\-D\-C (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{_a_d_c_8h_a342ab07b607f3dc4efa0655ca1acd164}
This function initializes the A\-D\-C. Thereby the A\-D\-C module is activated and the work frequency is set to F\-\_\-\-C\-L\-K/32. The reference voltage is set to A\-V\-C\-C (5\-V). The sampled analogous signal is not allowed to be higher as the reference voltage. The converted values are related to the interval \mbox{[}0-\/5\mbox{]}. The highest value (1023) for a measured analogous signal of 5\-V and the lowest value (0) for 0\-V. \hypertarget{_a_d_c_8h_a78b7cf5d1a236acaf9fbcc4aed22ff31}{\index{A\-D\-C.\-h@{A\-D\-C.\-h}!read\-\_\-2\-\_\-\-A\-D\-C@{read\-\_\-2\-\_\-\-A\-D\-C}}
\index{read\-\_\-2\-\_\-\-A\-D\-C@{read\-\_\-2\-\_\-\-A\-D\-C}!ADC.h@{A\-D\-C.\-h}}
\subsubsection[{read\-\_\-2\-\_\-\-A\-D\-C}]{\setlength{\rightskip}{0pt plus 5cm}uint16\-\_\-t read\-\_\-2\-\_\-\-A\-D\-C (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{channel}
\end{DoxyParamCaption}
)}}\label{_a_d_c_8h_a78b7cf5d1a236acaf9fbcc4aed22ff31}
Like read\-\_\-\-A\-D\-C, but two samples are taken and average value of the samples is returned \hypertarget{_a_d_c_8h_a8ccea788f2803928cb88aa9ed0f05d76}{\index{A\-D\-C.\-h@{A\-D\-C.\-h}!read\-\_\-4\-\_\-\-A\-D\-C@{read\-\_\-4\-\_\-\-A\-D\-C}}
\index{read\-\_\-4\-\_\-\-A\-D\-C@{read\-\_\-4\-\_\-\-A\-D\-C}!ADC.h@{A\-D\-C.\-h}}
\subsubsection[{read\-\_\-4\-\_\-\-A\-D\-C}]{\setlength{\rightskip}{0pt plus 5cm}uint16\-\_\-t read\-\_\-4\-\_\-\-A\-D\-C (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{channel}
\end{DoxyParamCaption}
)}}\label{_a_d_c_8h_a8ccea788f2803928cb88aa9ed0f05d76}
Like read\-\_\-\-A\-D\-C, but four samples are taken and average value of the samples is returned \hypertarget{_a_d_c_8h_ac598032b0c53050ef59fcbba6609206d}{\index{A\-D\-C.\-h@{A\-D\-C.\-h}!read\-\_\-\-A\-D\-C@{read\-\_\-\-A\-D\-C}}
\index{read\-\_\-\-A\-D\-C@{read\-\_\-\-A\-D\-C}!ADC.h@{A\-D\-C.\-h}}
\subsubsection[{read\-\_\-\-A\-D\-C}]{\setlength{\rightskip}{0pt plus 5cm}uint16\-\_\-t read\-\_\-\-A\-D\-C (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{channel}
\end{DoxyParamCaption}
)}}\label{_a_d_c_8h_ac598032b0c53050ef59fcbba6609206d}
Starts a conversation of the analogous signal at the specified channel and returns the result of the conversation. 